package com.liuhuanss.sheep.model;

import java.util.ArrayList;
import java.util.List;

public class GameState {
    private String gameId;
    private List<GameBlock> blocks;
    private List<String> slots; // 7个槽位
    private boolean gameOver;
    private boolean gameWon;
    private int score;

    public GameState() {
        this.blocks = new ArrayList<>();
        this.slots = new ArrayList<>();
        // 初始化7个空槽位
        for (int i = 0; i < 7; i++) {
            this.slots.add(null);
        }
        this.gameOver = false;
        this.gameWon = false;
        this.score = 0;
    }

    public GameState(String gameId) {
        this();
        this.gameId = gameId;
    }

    // Getters and Setters
    public String getGameId() {
        return gameId;
    }

    public void setGameId(String gameId) {
        this.gameId = gameId;
    }

    public List<GameBlock> getBlocks() {
        return blocks;
    }

    public void setBlocks(List<GameBlock> blocks) {
        this.blocks = blocks;
    }

    public List<String> getSlots() {
        return slots;
    }

    public void setSlots(List<String> slots) {
        this.slots = slots;
    }

    public boolean isGameOver() {
        return gameOver;
    }

    public void setGameOver(boolean gameOver) {
        this.gameOver = gameOver;
    }

    public boolean isGameWon() {
        return gameWon;
    }

    public void setGameWon(boolean gameWon) {
        this.gameWon = gameWon;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }
}